<template>
  <div class="lottery-item">
    <div class="lottery-header">
      <span class="lottery-name">{{ lottery.name }}</span>
      <span class="lottery-issue">第{{ lottery.issue }}期</span>
    </div>
    <div class="lottery-numbers">
      <van-row gutter="16">
        <van-col span="4" v-for="(number, index) in lottery.numbers" :key="index">
          <van-badge color="primary">{{ number }}</van-badge>
        </van-col>
      </van-row>
    </div>
    <div class="lottery-footer">
      <span class="lottery-date">{{ lottery.date }}</span>
    </div>
  </div>
</template>

<script>
import { defineComponent } from 'vue';

export default defineComponent({
  props: {
    lottery: Object,
  },
});
</script>

<style lang="scss">
.lottery-item {
  width: 300px;
  height: 200px;
  border: 1px solid #ccc;
  padding: 16px;
  border-radius: 8px;
}

.lottery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.lottery-name {
  font-size: 18px;
  font-weight: bold;
}

.lottery-issue {
  color: #999;
}

.lottery-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.lottery-footer {
  text-align: center;
  margin-top: 16px;
}
</style>
